# -*- coding: utf-8 -*-
"""
Python 3.13 兼容性配置
用于抑制已知的兼容性警告和设置环境变量
"""

import warnings
import os

# 抑制已知的兼容性警告
warnings.filterwarnings("ignore", message=".*MINGW-W64.*")
warnings.filterwarnings("ignore", message=".*invalid value encountered.*")
warnings.filterwarnings("ignore", message=".*pkg_resources is deprecated.*")
warnings.filterwarnings("ignore", message=".*Valid config keys have changed in V2.*")

# 设置环境变量
os.environ.setdefault('PYTHONIOENCODING', 'utf-8')
os.environ.setdefault('PYTHONLEGACYWINDOWSFSENCODING', '0')

print("✓ 兼容性配置已加载")